package com.xucia.jsponic.security;

import java.security.Principal;

import javax.security.auth.login.LoginException;
/**
 * This provides an interface for defining how security and authentication
 * is handled.
 * @author Kris Zyp
 *
 */
public interface SecurityHandler {
	/**
	 * The gets the supervisor group that has full access in the system
	 * @return
	 */
	public java.security.acl.Group getSupervisorGroup();
	/**
	 * This gets a the public user
	 * @return
	 */
	public Principal getPublicUser();
	/**
	 * This performs authentication and returns a principal
	 * @param username
	 * @param password
	 * @return
	 * @throws LoginException
	 */
	public Principal authenticate(final String username, final String password) throws LoginException;
}
